<?php
class controller_setting extends controller_abstract
{
	function __construct(& $app)
	{
		parent::__construct($app);
	}
	
	function index()
	{
		if ($this->is_post())
		{
			unset($_POST['submit']);
			config::set('system', $_POST);
			$this->showmessage('设置成功', url('caitu/setting/index'));
		}
		else
		{
			$head = array('title'=>'配置');
			$this->view->assign('head', $head);
			$this->view->display('setting');
		}
	}
}